﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;


namespace DotNetExtensions.UnitTest.Util
{
	public class ProcessUtil
	{
		public static void PrintProcessInfo()
		{
			Process process = Process.GetCurrentProcess();
			ConsoleUtil.WriteLine("Process Info:");
			Console.WriteLine("    StartInfo.FileName: {0:N0}", process.StartInfo.FileName);
			Console.WriteLine("    ProcessName: {0:N0}", process.ProcessName);
			Console.WriteLine("    MaxWorkingSet: {0:N0}", process.MaxWorkingSet.ToInt64());
			Console.WriteLine("    MinWorkingSet: {0:N0}", process.MinWorkingSet.ToInt64());
			Console.WriteLine("    NonpagedSystemMemorySize64: {0:N0}", process.NonpagedSystemMemorySize64);
			Console.WriteLine("    PagedMemorySize64: {0:N0}", process.PagedMemorySize64);
			Console.WriteLine("    PagedSystemMemorySize64: {0:N0}", process.PagedSystemMemorySize64);
			Console.WriteLine("    PeakPagedMemorySize64: {0:N0}", process.PeakPagedMemorySize64);
			Console.WriteLine("    PeakVirtualMemorySize64: {0:N0}", process.PeakVirtualMemorySize64);
			Console.WriteLine("    PeakWorkingSet64: {0:N0}", process.PeakWorkingSet64);
			Console.WriteLine("    PrivateMemorySize64: {0:N0}", process.PrivateMemorySize64);
			Console.WriteLine("    SessionId: {0:N0}", process.SessionId);
			Console.WriteLine("    VirtualMemorySize64: {0:N0}", process.VirtualMemorySize64);
			Console.WriteLine("    WorkingSet64: {0:N0}", process.WorkingSet64);
		}
	}
}
